解决方案 »

  1.   

    不会吧,建完数据库后,查询一下这个:select db_name(database_id) dbname,
           name,
           physical_name    --路径
    from sys.master_files
    where database_id = DB_ID('Accouting')
      

  2.   

    不过需要注意的,路径都是存在的,比如:G:\SQl 还有  H:\SQl
      

  3.   

    问题1:我不知道你的代码为什么会成功,我这边是报错的
    create database Accouting
    on 
    (name='Accouting',
     filename='G:\SQl\AccoutingData.mdf\',  --这里的\不应该带上,因为mdf是文件后缀名不是目录名
     size=10,
     maxsize=50,
     filegrowth=5)
    log on
     (name='AccountingLog',
      filename='H:\SQl\AccountingLog.ldf',
      size=5MB,
      maxsize=25MB,
      filegrowth=5MB);
    go问题2:我把上面错误的地方改了,由于我没有G盘,所以改成E盘,创建成功,检查一下你的代码和环境,你的代码把问题1中的问题去掉了应该可以的
      

  4.   

    另外如果想反复执行,在最开头加上:
    if db_id('Accouting') is not null
    drop database Accouting