| |

VerySource

 Forgot password?
 Register
Search
View: 2577|Reply: 15

sql express problem, very urgent

[Copy link]

1

Threads

11

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

Post time: 2020-3-18 18:30:02
| Show all posts |Read mode
create database tes
on primary
(
name = tes,
filename = 'c:\tes.mdf'
)
error:
Message 1802, Level 16, State 4, Line 1
CREATE DATABASE failed. Unable to create some of the file names listed. Please review related errors.
Message 5123, Level 16, State 1, Line 1
CREATE FILE encountered operating system error 5 (Access denied.) While trying to open or create the physical file 'c:\tes.mdf'.
Can be created in sql server
Reply

Use magic Report

0

Threads

211

Posts

108.00

Credits

Newbie

Rank: 1

Credits
108.00

 China

Post time: 2020-6-21 17:45:01
| Show all posts
--try

create database tes
on primary
(
name=tes,
filename='c:\tes.mdf'
)
on log
(name=tes_log,
filename='c:\tes_log.ldf')
Reply

Use magic Report

0

Threads

211

Posts

108.00

Credits

Newbie

Rank: 1

Credits
108.00

 Unknown

Post time: 2020-6-21 20:15:01
| Show all posts
--Wrong, change


create database tes
on primary
(
name=tes,
filename='c:\tes.mdf'
)
log on
(name=tes_log,
filename='c:\tes_log.ldf')
Reply

Use magic Report

0

Threads

126

Posts

73.00

Credits

Newbie

Rank: 1

Credits
73.00

 China

Post time: 2020-6-22 10:45:01
| Show all posts
Check user rights, directory access rights, whether the target file exists, etc.
Reply

Use magic Report

1

Threads

11

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

 Author| Post time: 2020-6-22 11:30:01
| Show all posts
The big brother above doesn't work, I asked why it was wrong to create a system directory in sql express,
Including the directory where I created the application

create database tes
on primary
(
name=tes,
filename='c:\tes.mdf'
)
log on
(name=tes_log,
filename='c:\tes_log.ldf')
Tried, not the same error
Reply

Use magic Report

1

Threads

11

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

 Author| Post time: 2020-6-22 14:00:02
| Show all posts
I use the sa system administrator login
Reply

Use magic Report

1

Threads

11

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

 Author| Post time: 2020-6-22 15:30:01
| Show all posts
Is it necessary to set directory permissions? It was not set before.
Reply

Use magic Report

0

Threads

126

Posts

73.00

Credits

Newbie

Rank: 1

Credits
73.00

 China

Post time: 2020-6-22 17:00:02
| Show all posts
The default log file is c:\tes_log.LDF
Reply

Use magic Report

1

Threads

11

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

 Author| Post time: 2020-6-22 22:45:01
| Show all posts
Brother, is it related to the default log file?
Reply

Use magic Report

0

Threads

126

Posts

73.00

Credits

Newbie

Rank: 1

Credits
73.00

 China

Post time: 2020-6-22 23:30:01
| Show all posts
See if it already exists c:\tes.mdf, c:\tes_log.LDF?
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list