Showing posts with label files. Show all posts
Showing posts with label files. Show all posts

Monday, March 26, 2012

Please help - Missing sqlbw.exe of SQL Server 2005

Recently, my SQL server infected with virus which modified some of .exe files on the server. Unfortunatly, the auti-virus software found those infected .exe files and removed them from server including the sqlbw.exe. Now I can't run the management studio. I tried to reinstall the only the management tools but failed. It said that my version is incorrect. I also tried to apply the SP1 but failed too. What can I do to recover only the management studio? I don't want to uninstall the SQL server because I have live database running on it. Please help.

If you cannot have a downtime to the databases then only way is to install another instance of SQL and use those tools to use this database.|||Have you tried uninstalling the original tools?|||

Why are you trying to run sqlbw.exe? You can launch management studio using sqlwb.exe and not sqlbw.exe

Thanks,

Sravanthi

Please HELP - I am getting security errors hwen trying to open the

Hi,
I am trying to open Reposrt Services , I get the following error.
'C:\Program Files\Microsoft SQL Server\MSSQL\Reporting
Services\ReportManager\'. The directory does not exist or is not accessible
because of security settings.]
I do not know what went wrong. Could any one please help.
Thanks Much,
--
snbatDid it work at one point? What changed? Does the directory exist?
Jeff
"snbat" <snbat@.discussions.microsoft.com> wrote in message
news:2ED1BBAD-3E0A-4CFD-9C08-ABEBB3A7A47F@.microsoft.com...
> Hi,
> I am trying to open Reposrt Services , I get the following error.
> 'C:\Program Files\Microsoft SQL Server\MSSQL\Reporting
> Services\ReportManager\'. The directory does not exist or is not
accessible
> because of security settings.]
> I do not know what went wrong. Could any one please help.
> Thanks Much,
>
> --
> snbat

Friday, March 23, 2012

Please evaluate this approach to shrinking log files

I've been tasked with taking over the support for a client's SQL Server
database. I'm not a DBA by profession, I'm a software developer who
uses SQL Server as a database designer.

The clients have reported that the server is running out of disk space
and examination shows that the log files for several of the databases
are at 5Gb or more.

After reading around the subject I suggested the following sequence of
operations:

-- Select the name of the database you want to shrink
USE MyDB

-- Dump unwanted transactions
dump tran MyDB with truncate_only

-- Get the name of the logfile
SELECT * from sysfiles

-- Having examined the rows returned by this use the log file...

-- Shrink the file to required size (in MB)
DBCC SHRINKFILE('MyDB_log', 10)

Is this a reasonable approach? Please bear in mind that I'm pretty new
to this, and I have many other tasks to do besides manage the server.
A previous DBA has set up good maintenance plans etc. so everything is
being properly backed up (well, I think it is)

If this IS a good approach, would it be reasonable to do this on, say,
a monthly basis as a scheduled job? Obviously the step

SELECT * from sysfiles

which gives us the physical name of the log file would be removed and
the job would operate explicitly on each log file for each database in
turn.

Many thanks for reading.

William Balmer.A previous DBA has set up good maintenance plans etc. so everything is

Quote:

Originally Posted by

being properly backed up (well, I think it is)


A common cause of unruly log files is that the database is in the FULL
recovery model but regular transaction log backups are not scheduled. Since
committed transactions won't get removed from the log until the log backup,
manual action is required to reduce the log size.

If you need to minimize data loss, the best approach is to schedule regular
log backups to run periodically between full database backups. You can
include this as part of a database maintenance plan. If more data loss is
acceptable (i.e. your plan is to simply restore from the last full backup),
you can use the SIMPLE recovery model so that committed data are
automatically removed from the log and you don't need to bother with log
backups.

In any case, the log should be sized to accommodate the activity between log
backups (FULL recovery) or the largest transaction (SIMPLE). The high-water
mark of this log space is simply the cost of doing business. IMHO, log file
shrinking should be done only after the log grows due to unusual activity.
I wouldn't schedule log shrinking because automating the process will only
hide the underlying cause.

Keep in mind that the number one responsibility of a DBA (or one that wears
a DBA hat) is to implement and test a backup/recovery plan. If you haven't
already done so, I suggest you run a restore test. You don't want any
surprises when you need to do it for real.

--
Hope this helps.

Dan Guzman
SQL Server MVP

"William" <williambalmer@.hotmail.comwrote in message
news:1157713799.376752.153540@.i3g2000cwc.googlegro ups.com...

Quote:

Originally Posted by

I've been tasked with taking over the support for a client's SQL Server
database. I'm not a DBA by profession, I'm a software developer who
uses SQL Server as a database designer.
>
The clients have reported that the server is running out of disk space
and examination shows that the log files for several of the databases
are at 5Gb or more.
>
After reading around the subject I suggested the following sequence of
operations:
>
-- Select the name of the database you want to shrink
USE MyDB
>
-- Dump unwanted transactions
dump tran MyDB with truncate_only
>
-- Get the name of the logfile
SELECT * from sysfiles
>
-- Having examined the rows returned by this use the log file...
>
-- Shrink the file to required size (in MB)
DBCC SHRINKFILE('MyDB_log', 10)
>
Is this a reasonable approach? Please bear in mind that I'm pretty new
to this, and I have many other tasks to do besides manage the server.
A previous DBA has set up good maintenance plans etc. so everything is
being properly backed up (well, I think it is)
>
If this IS a good approach, would it be reasonable to do this on, say,
a monthly basis as a scheduled job? Obviously the step
>
SELECT * from sysfiles
>
which gives us the physical name of the log file would be removed and
the job would operate explicitly on each log file for each database in
turn.
>
Many thanks for reading.
>
William Balmer.
>

|||Dan Guzman wrote:

snip

Many thanks, Dan - much to think about. I'll read up on the various
topics and may post later if I come up against a brick wall!

Thanks again

William Balmer

Tuesday, March 20, 2012

placing system table filegroup and Log files on same drive

Is it better to create a seperate filegroup for all user tables ? And if so
should all the system tables that belong to the Primary filegroup reside on
the same drive with the log file . I am using SQL 2000. Which system tables
get hit the most daily for any inserts,updates and deletes that may be
occuring on the server
ThanksDepends on the disk configuration.
I believe it is generally recommended to separate the log file from any data
files, i.e., separate physical disks... however, if you have a multiple
channel controller, with high thoroughput on each channel, you may be able
to get by w/ having the log and the data on the same logical disk.
I believe that all system tables must reside in PRIMARY, I'd have to verify.
If that is true, it doesn't matter what system tables get inserts, updates,
deletes. However, you are taking away some fault tolerance if you put the
system tables and the log files on the same physical disk.
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:%23AKD5sEXDHA.1872@.TK2MSFTNGP12.phx.gbl...
> Is it better to create a seperate filegroup for all user tables ? And if
so
> should all the system tables that belong to the Primary filegroup reside
on
> the same drive with the log file . I am using SQL 2000. Which system
tables
> get hit the most daily for any inserts,updates and deletes that may be
> occuring on the server
> Thanks
>|||You also generally want log files on RAID 1 or 10 as they are continuously
sequentially writing.
Thanks,
Greg H
"Martin Schmid" <martinschmid@.sbcglobal.net.nospam> wrote in message
news:eoDKm2EXDHA.2212@.TK2MSFTNGP09.phx.gbl...
> Depends on the disk configuration.
> I believe it is generally recommended to separate the log file from any
data
> files, i.e., separate physical disks... however, if you have a multiple
> channel controller, with high thoroughput on each channel, you may be able
> to get by w/ having the log and the data on the same logical disk.
> I believe that all system tables must reside in PRIMARY, I'd have to
verify.
> If that is true, it doesn't matter what system tables get inserts,
updates,
> deletes. However, you are taking away some fault tolerance if you put the
> system tables and the log files on the same physical disk.
>
> "Hassan" <fatima_ja@.hotmail.com> wrote in message
> news:%23AKD5sEXDHA.1872@.TK2MSFTNGP12.phx.gbl...
> > Is it better to create a seperate filegroup for all user tables ? And if
> so
> > should all the system tables that belong to the Primary filegroup reside
> on
> > the same drive with the log file . I am using SQL 2000. Which system
> tables
> > get hit the most daily for any inserts,updates and deletes that may be
> > occuring on the server
> >
> > Thanks
> >
> >
>|||Hassan
If you are using SQL Server 7, it is a good idea to put
your system files in a seperate filegroup. If you get a
corrupted user table, if your system tables are in a
seperate filegroup you can still perform a transaction log
backup prior to invoking DR (If you have DR of course). If
they are in the same filegroup you may not be able to.
This is no longer an issue in 2000.
Hope this helps
John

Placing MSDE .mdf and .ldf files on seperate drives.

Hi,
I know that SQL Server (MSDE), databases run much faster when the data and log files are on seperate physical devices. I can do this explictly when I write a CREATE DATABASE SQL script, but would like to change the MODEL database so that all new databases use the sperate data/log file assignments by default. I haven't found a way to alter the sysfiles table in model - I can read the data, but it balks at trying to update it. (recordset is not updateable, or adhoc querries not allowed against a system database).

I didn't see any options on the MSDE install that implements seperate data/log paths.

I don't have the SQL Server tools (like Enterprise Manager) available, but I do have VS.NET 03 (Standard). And Web Data Administrator.

Any suggestions? Thanks in advance.When you install MSDE you can add settings to the setup.ini file that specify the TARGETDIR (where the binaries and log files go) and DATADIR (where the data goes).

If you need to move the locations of those after the fact,Books Online contains a topic called "Attaching and Detaching a Database" which explains how.

Terri|||Excellent, thanks for the information! I'll check out the Books online link.

I think part of the problem of finding the information that I'm sure must be in the documentation, is knowing the exact terminology used. "Attaching and Detaching" never made it into my search input box. Thanks again..|||If you haven't yet downloaded and installed Books Online you definitely should! I myself refer to it dozens of times each week. It's a terrific free SQL Server 2000 reference and really helps with synax as well as larger concepts.

And yes, it can certainly be a struggle to figure out which terms to look for!

Terri|||Hi,
Thanks again for the BOOKS ONLINE reference, I've used it a number of times already. Curiously, it hasn't been much help with my original problem. I did learn about detaching and reattaching databases, and that it one way to get the physical locations set for my user DB .mdf and .ldf files. I still haven't worked out how to get the model database to refelct these new assignments (thought there are a few more thngs to try).

While searching the BOOKS ONLINE, I did find the customizing MSDE install section. Unfortunatelly, it looks like there are no paramenters to the setup that will allow an installation with seperate drive locations for the data and log files. You can specify the location of the system data files, but the setup automatically adds the log file in the same location. I had considered reinstalling MSDE, or adding a new instance, but that doesn't seem to offer a solution.

I've run into a number of roadblocks when trying to relocate the assignments of the data or log files with the system BDs. Understandably, the system is quite restrictive about manipulating system files. If someone has established an instance of MSDE with sperate physical drive locations for the data and log files, I'd be interested in knowing how they did that.

Other than getting the model DB set up with the data files on one drive and log files on another (so that new USER DBs would follow that pattern), I'm not sure that there would be an advantage to this scheme anyway. I wouldn't think that the master DB data and log files get written to often enough to make a perfomance difference. If an application is creating SQL Server objects dynamically all the time, maybe; but not under normal use. I'd guess the same holds true for other system DBs.

Where it stands now, I can get all my user DBs set up the way I'd like; though I can't get the model DB to do this automattically for new user DBs. I can't get the system DB dat and log files on sperate drives, but that may not be important. I just wonder is MS set it up that way as a performance governor for MSDE?|||Brain,

You won't find much in Books Online about MSDE. MSDE, for all intents and purposes is just SQL Server without a number of the tools (Enterprise manager, etc), and 'hobbled' to certain database sizes etc.

You've got a few options to move your database files around:
1) detach and reattach with the files in the desired locations. This takes your DB offline for a few minutes while you make the change. Check out Books Online for sp_attach_db and sp_detach_db
(this one's a bit tricky/ugly).
2) ALTER the database to specify the creation of NEW files. Look into ALTER DATABASE (add and remove file options). This allows you do to everything while the db is up and running.. but can present some issues where you'll need to tidy things up.
3) Do a backup of your database, then restore it over itself with the files MOVED to where you want them. This might be the best option. And will look something like:

-- backup the db
BACKUP DATABASE myDatabaseName TO DISK = N'C:oink.bak'

-- create a device to 'wrap' your backup and details:
EXEC sp_addumpdevice 'disk', 'mydevice','C:\oink.BAK'

-- Now... just execute this:
RESTORE FILELISTONLY FROM mydevice

this shows you all of your logical file names as well as the actual paths to those files.

map those into something like the following:
RESTORE DATABASE
[myDatabase]
FROM
[mydevice]
WITH
RECOVERY, -- make it work when it comes back online
REPLACE, -- overwrite the existing database if it's there
STATS = 25,
MOVE 'logicalfilename' TO 'G:\SQLData\ProductCatalog_Data.MDF'
,MOVE 'logicalfilename' TO 'F:\SQLData\ProductCatalog_Log.LDF'

EXEC sp_dropdevice mydevice --,'delfile'

the logicalfilenames above correspond to the logical name returned in the resultset you get when you do RESTOREFILELISTONLY

hth

Monday, March 12, 2012

Placing data and log files seperately

Hi, Gurus, I am running SQL-Server 2000 on SCSIIs with Raid-5. Three disks. I see only one Logical Disk with 3 partitions. Since it's recommended to have Log files seperate to Data files physicially, currently both exist in the D-Drive. How can it be accomplished?

Another question for ur kind suggestion. I have a merge-repl setup. Publisher and distributor at the same machine. One subscriber over the internet. Replication works through VPN rather that FTP. Whenever i apply SNAPSHOT it takes more that 12 hrs to replicate the 2 GB DB. Although VPN is more secured but the tunneling makes the replication rather slow i guess. Will there be a major difference if i open the default port of ftp on the ISA and change the subscriber to get the SNAPSHOT as Anonymous Subsciption. I mean What's better, Security VS Performance. During the SNAPSHOT the Web-users running on the Subscriber wait for the latest data which is very much annoying.

Another question please, I wanna replace the current publisher-DB machine with a new Hardware-Machine. I don't wanna lose Replication and re-running the SNAPSHOT. Is it possible to retain the publication by restoring the Master, Publication and Distributor respectively on the new machine. The new machine will have the same Operating system name and configuration.

Regards!!Howdy,

Buy another disk for your log if you want to go that way. As you have a RAID 5 array, all disks in the array will besame speed. The benefit of a separate disk for logs is that logs are written sequentially ( so faster ).
When you have new disk for logs, detach the database from the sevrer, move the log files ( .LDF ) to new log disk, reattach database with logs in the new location.

Security is worth the slow speed....especially if you get hacked. But, there may be a way to get data onto a secure FTP site.

Restore should be OK. Treat this like a disaster recovery test.

Cheers,

SG.|||Another question please, I wanna replace the current publisher-DB machine with a new Hardware-Machine. I don't wanna lose Replication and re-running the SNAPSHOT. Is it possible to retain the publication by restoring the Master, Publication and Distributor respectively on the new machine. The new machine will have the same Operating system name and configuration.

No problem refer to books online for 'Backing Up and Restoring Replication Databases' topic for more details.|||Thanx. I'll let u know if i face any problem while doing the restore.

Regards.

Placing a table on multiple files

I have very two big tables and I want to put them on
multiple files within a file group. I know that a
filegroup can have multiple files,but I am not sure how
exactly the table spans across the files.
Is there any way that I can put the table on multiple
files?
Please provide me some examples.
Thanks for help.
RajIf you have multiple files in a filegroup, and create the table on that =filegroup then the table will automatically be allocated space across =the two files. This space will be taken as the table grows, space is =taken in the same ratio as the currently available free space within the =file.
What would be interesting is:
What do you mean by big?
What are you looking to achieve?
Are the two(or more) files all physically on different drives or merely =separate files on the same array.
The benefits you may see (or not see) are all affected by the above.
Mike John
"Raj" <vmresumes@.yahoo.com> wrote in message =news:909a01c345b3$0b4f6140$a401280a@.phx.gbl...
> I have very two big tables and I want to put them on > multiple files within a file group. I know that a > filegroup can have multiple files,but I am not sure how > exactly the table spans across the files.
> > Is there any way that I can put the table on multiple > files?
> > Please provide me some examples.
> > Thanks for help.
> > Raj|||Thanks for the response.
We have 2 fact tables each 10 GB. To gain the performance and aslo easy
management of files, I wanted to put on different physical disks.
Raj.
"Mike John" <Mike.John@.knowledgepool.com> wrote in message
news:OuDOvSdRDHA.2144@.TK2MSFTNGP11.phx.gbl...
If you have multiple files in a filegroup, and create the table on that
filegroup then the table will automatically be allocated space across the
two files. This space will be taken as the table grows, space is taken in
the same ratio as the currently available free space within the file.
What would be interesting is:
What do you mean by big?
What are you looking to achieve?
Are the two(or more) files all physically on different drives or merely
separate files on the same array.
The benefits you may see (or not see) are all affected by the above.
Mike John
"Raj" <vmresumes@.yahoo.com> wrote in message
news:909a01c345b3$0b4f6140$a401280a@.phx.gbl...
> I have very two big tables and I want to put them on
> multiple files within a file group. I know that a
> filegroup can have multiple files,but I am not sure how
> exactly the table spans across the files.
> Is there any way that I can put the table on multiple
> files?
> Please provide me some examples.
> Thanks for help.
> Raj|||Sounds very sensible then - sorry for the questions but you often get =people worrying about a huge (2Gb) table and then creating multiple =filegroups on the same raid 5 array, which all gets a bit pointless!
Mike
"Vish" <mocherla_v@.hotmail.com> wrote in message =news:eHjqdPeRDHA.2480@.tk2msftngp13.phx.gbl...
> Thanks for the response.
> > We have 2 fact tables each 10 GB. To gain the performance and aslo =easy
> management of files, I wanted to put on different physical disks.
> > Raj.
> > "Mike John" <Mike.John@.knowledgepool.com> wrote in message
> news:OuDOvSdRDHA.2144@.TK2MSFTNGP11.phx.gbl...
> If you have multiple files in a filegroup, and create the table on =that
> filegroup then the table will automatically be allocated space across =the
> two files. This space will be taken as the table grows, space is taken =in
> the same ratio as the currently available free space within the file.
> > What would be interesting is:
> > What do you mean by big?
> What are you looking to achieve?
> Are the two(or more) files all physically on different drives or =merely
> separate files on the same array.
> > The benefits you may see (or not see) are all affected by the above.
> > Mike John
> > "Raj" <vmresumes@.yahoo.com> wrote in message
> news:909a01c345b3$0b4f6140$a401280a@.phx.gbl...
> > I have very two big tables and I want to put them on
> > multiple files within a file group. I know that a
> > filegroup can have multiple files,but I am not sure how
> > exactly the table spans across the files.
> >
> > Is there any way that I can put the table on multiple
> > files?
> >
> > Please provide me some examples.
> >
> > Thanks for help.
> >
> > Raj
> > >=20

Placement of datafiles and log files

This is my first sql server app so I'm pretty ignorant.
In my production environment I have a server with 4
processors and 4 drives and is part of a SANS network. 2
drives are mirrorred to be c: and two drives are mirrorred
to be d:, both RAID1. I also have another drive (T:)
available for my app. I have my datafiles for this app on
the t: drive which is RAID5 and I have my log files on
drive d:. Is this the recommended practice. I know that
I read that I need to separate my data files and log
files. Please advise.
Thanks,
EdieThat seems like a reasonable setup. To be able to give more precise
suggestions, we'd need I/O metrics for the current config. I suggest you
keep it like it is unless you have performance problems and are willing to
spend some time on the issue.
--
Tibor Karaszi, SQL Server MVP
Archive at:
http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
"Edie Richardson" <anonymous@.discussions.microsoft.com> wrote in message
news:034e01c3be9f$6c680620$a401280a@.phx.gbl...
> This is my first sql server app so I'm pretty ignorant.
> In my production environment I have a server with 4
> processors and 4 drives and is part of a SANS network. 2
> drives are mirrorred to be c: and two drives are mirrorred
> to be d:, both RAID1. I also have another drive (T:)
> available for my app. I have my datafiles for this app on
> the t: drive which is RAID5 and I have my log files on
> drive d:. Is this the recommended practice. I know that
> I read that I need to separate my data files and log
> files. Please advise.
> Thanks,
> Edie|||Thanks. If I were to add more databases to that instances
of sql server, would it be a good practice to put all my
log files on that one D Drive?
>--Original Message--
>That seems like a reasonable setup. To be able to give
more precise
>suggestions, we'd need I/O metrics for the current
config. I suggest you
>keep it like it is unless you have performance problems
and are willing to
>spend some time on the issue.
>--
>Tibor Karaszi, SQL Server MVP
>Archive at:
>http://groups.google.com/groups?
oi=djq&as_ugroup=microsoft.public.sqlserver
>
>"Edie Richardson" <anonymous@.discussions.microsoft.com>
wrote in message
>news:034e01c3be9f$6c680620$a401280a@.phx.gbl...
>> This is my first sql server app so I'm pretty ignorant.
>> In my production environment I have a server with 4
>> processors and 4 drives and is part of a SANS network.
2
>> drives are mirrorred to be c: and two drives are
mirrorred
>> to be d:, both RAID1. I also have another drive (T:)
>> available for my app. I have my datafiles for this app
on
>> the t: drive which is RAID5 and I have my log files on
>> drive d:. Is this the recommended practice. I know
that
>> I read that I need to separate my data files and log
>> files. Please advise.
>> Thanks,
>> Edie
>
>.
>|||Yes, I think so. Ideally, each database should have it's on drive for the
log, but sometimes that is not practical. Isolating other stuff from the
drive where you have a number of databases log files is still better than
mix 'n match, IMO.
--
Tibor Karaszi, SQL Server MVP
Archive at:
http://groups.google.com/groups?oi=djq&as_ugroup=microsoft.public.sqlserver
<anonymous@.discussions.microsoft.com> wrote in message
news:000301c3c011$770047f0$a501280a@.phx.gbl...
> Thanks. If I were to add more databases to that instances
> of sql server, would it be a good practice to put all my
> log files on that one D Drive?
> >--Original Message--
> >That seems like a reasonable setup. To be able to give
> more precise
> >suggestions, we'd need I/O metrics for the current
> config. I suggest you
> >keep it like it is unless you have performance problems
> and are willing to
> >spend some time on the issue.
> >
> >--
> >Tibor Karaszi, SQL Server MVP
> >Archive at:
> >http://groups.google.com/groups?
> oi=djq&as_ugroup=microsoft.public.sqlserver
> >
> >
> >"Edie Richardson" <anonymous@.discussions.microsoft.com>
> wrote in message
> >news:034e01c3be9f$6c680620$a401280a@.phx.gbl...
> >> This is my first sql server app so I'm pretty ignorant.
> >> In my production environment I have a server with 4
> >> processors and 4 drives and is part of a SANS network.
> 2
> >> drives are mirrorred to be c: and two drives are
> mirrorred
> >> to be d:, both RAID1. I also have another drive (T:)
> >> available for my app. I have my datafiles for this app
> on
> >> the t: drive which is RAID5 and I have my log files on
> >> drive d:. Is this the recommended practice. I know
> that
> >> I read that I need to separate my data files and log
> >> files. Please advise.
> >>
> >> Thanks,
> >> Edie
> >
> >
> >.
> >

Placement of database (newbie question)

I want to create a new database and place it in a drive
and directory other than C:\Program files\microsoft SQL
Server\MSSQL\Data. When I attempt this I get Error 5123:
CREATE FILE encountered operating system error5(Access
denied).....
Must I create the new database in the C: as above? If not
how do I get around the above. I can create files and
folders in that drive from any other program.
The reason for creating in a different drive is space
issues.
Anon,
What account rights is the SQL Server service running with? Are you running
as a local admin? Or a specific account?
What this is telling you is that that account does not have rights to your
destination. You should be able to grant rights to the directory to your
SQL Server account and all will be fine.
The following article on MSDN has a lot of server setup information:
Microsoft SQL Server 2000 Scalability Project-Server Consolidation
http://tinyurl.com/5asz7
Russell Fields
<anonymous@.discussions.microsoft.com> wrote in message
news:506001c4911c$c657a140$a501280a@.phx.gbl...
> I want to create a new database and place it in a drive
> and directory other than C:\Program files\microsoft SQL
> Server\MSSQL\Data. When I attempt this I get Error 5123:
> CREATE FILE encountered operating system error5(Access
> denied).....
> Must I create the new database in the C: as above? If not
> how do I get around the above. I can create files and
> folders in that drive from any other program.
> The reason for creating in a different drive is space
> issues.

Placement of database (newbie question)

I want to create a new database and place it in a drive
and directory other than C:\Program files\microsoft SQL
Server\MSSQL\Data. When I attempt this I get Error 5123:
CREATE FILE encountered operating system error5(Access
denied).....
Must I create the new database in the C: as above? If not
how do I get around the above. I can create files and
folders in that drive from any other program.
The reason for creating in a different drive is space
issues.Anon,
What account rights is the SQL Server service running with? Are you running
as a local admin? Or a specific account?
What this is telling you is that that account does not have rights to your
destination. You should be able to grant rights to the directory to your
SQL Server account and all will be fine.
The following article on MSDN has a lot of server setup information:
Microsoft SQL Server 2000 Scalability Project-Server Consolidation
http://tinyurl.com/5asz7
Russell Fields
<anonymous@.discussions.microsoft.com> wrote in message
news:506001c4911c$c657a140$a501280a@.phx.gbl...
> I want to create a new database and place it in a drive
> and directory other than C:\Program files\microsoft SQL
> Server\MSSQL\Data. When I attempt this I get Error 5123:
> CREATE FILE encountered operating system error5(Access
> denied).....
> Must I create the new database in the C: as above? If not
> how do I get around the above. I can create files and
> folders in that drive from any other program.
> The reason for creating in a different drive is space
> issues.

Placement of database (newbie question)

I want to create a new database and place it in a drive
and directory other than C:\Program files\microsoft SQL
Server\MSSQL\Data. When I attempt this I get Error 5123:
CREATE FILE encountered operating system error5(Access
denied).....
Must I create the new database in the C: as above? If not
how do I get around the above. I can create files and
folders in that drive from any other program.
The reason for creating in a different drive is space
issues.Anon,
What account rights is the SQL Server service running with? Are you running
as a local admin? Or a specific account?
What this is telling you is that that account does not have rights to your
destination. You should be able to grant rights to the directory to your
SQL Server account and all will be fine.
The following article on MSDN has a lot of server setup information:
Microsoft SQL Server 2000 Scalability Project-Server Consolidation
http://tinyurl.com/5asz7
Russell Fields
<anonymous@.discussions.microsoft.com> wrote in message
news:506001c4911c$c657a140$a501280a@.phx.gbl...
> I want to create a new database and place it in a drive
> and directory other than C:\Program files\microsoft SQL
> Server\MSSQL\Data. When I attempt this I get Error 5123:
> CREATE FILE encountered operating system error5(Access
> denied).....
> Must I create the new database in the C: as above? If not
> how do I get around the above. I can create files and
> folders in that drive from any other program.
> The reason for creating in a different drive is space
> issues.

Place your data and log files on a SAN disk

Hi all!
I have a question about SQL Server 2000 and SAN.
Is it supported by MS to place your data and log files on a SAN disk? I have tryed to get info about this on MS site but can't find everything.
Links or info would be greatly appreciated!
Regards
Fredrik
Fredrik,
Yes it is supported, in fact I would recommend it. Do not use NAS as
mentioned in this article:
Microsoft Knowledge Base Article - 304261
INF: Support for Network Database Files
http://support.microsoft.com/?id=304261
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
"Fredrik" <anonymous@.discussions.microsoft.com> wrote in message
news:DEC7445D-2912-4B7C-A7D9-1ECC627DADEA@.microsoft.com...
> Hi all!
> I have a question about SQL Server 2000 and SAN.
> Is it supported by MS to place your data and log files on a SAN disk? I
have tryed to get info about this on MS site but can't find everything.
> Links or info would be greatly appreciated!
> Regards
> Fredrik

Place your data and log files on a SAN disk

Hi all!
I have a question about SQL Server 2000 and SAN.
Is it supported by MS to place your data and log files on a SAN disk? I have
tryed to get info about this on MS site but can't find everything.
Links or info would be greatly appreciated!
Regards
FredrikFredrik,
Yes it is supported, in fact I would recommend it. Do not use NAS as
mentioned in this article:
Microsoft Knowledge Base Article - 304261
INF: Support for Network Database Files
http://support.microsoft.com/?id=304261
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
"Fredrik" <anonymous@.discussions.microsoft.com> wrote in message
news:DEC7445D-2912-4B7C-A7D9-1ECC627DADEA@.microsoft.com...
> Hi all!
> I have a question about SQL Server 2000 and SAN.
> Is it supported by MS to place your data and log files on a SAN disk? I
have tryed to get info about this on MS site but can't find everything.
> Links or info would be greatly appreciated!
> Regards
> Fredrik

Friday, March 9, 2012

PKZip issue

I have command line PKZip (pkzipc.exe) installed on my SQL Server 2000.
I want to use it to zip up some text files that I receive and process
on a daily basis to save space. I want to schedule it to run as a job.
The problem is that when I run the job as a standard user, it just does
not work. No error messages or anything. If I make the job owned by
SA, it is fine.

My only thought is that when I am signed in as a SA, my account on the
box is in the Admin group. When I sign in as a standard user, I am not
sure what account it uses to hit the file system. I would assume it
would use the xp_cmdshelluser account I have set up but I am not sure.

Has anyone seen this before? It has me stumped.

Any ideas??

Thanks!

Jim Youmans
St Louis, MissouriIn SQL 2000, the SQL Agent Proxy account is used as the OS security context
for non-sysadmin users. This is configurable from Enterprise Manager under
SQL Agent-->Properties-->Job System. When the 'Only users with Sysadmin
privileges..' is unchecked, you can specify the Windows account to be used
as the security context for non-sysadmin users. It's best to specify a
minimally privileged account.

I see you are located in St. Louis, You might consider joining our local
SQL Server User Group (http://www.stlssug.org/index.html) if you haven't
already done so. We also have a BI special interest group.

--
Hope this helps.

Dan Guzman
SQL Server MVP

"Jim" <jdyoumans@.gmail.comwrote in message
news:1158185320.259108.169510@.p79g2000cwp.googlegr oups.com...

Quote:

Originally Posted by

>I have command line PKZip (pkzipc.exe) installed on my SQL Server 2000.
I want to use it to zip up some text files that I receive and process
on a daily basis to save space. I want to schedule it to run as a job.
The problem is that when I run the job as a standard user, it just does
not work. No error messages or anything. If I make the job owned by
SA, it is fine.
>
My only thought is that when I am signed in as a SA, my account on the
box is in the Admin group. When I sign in as a standard user, I am not
sure what account it uses to hit the file system. I would assume it
would use the xp_cmdshelluser account I have set up but I am not sure.
>
Has anyone seen this before? It has me stumped.
>
Any ideas??
>
Thanks!
>
Jim Youmans
St Louis, Missouri
>

|||Thank you for your suggestions. I am a member of the user group and my
coworker who solved this was at the meeting on Wed.

Here is how we ended up solving the issue. Hope it helps someone else.

"I was finally able to get PKZIPC to work as a non-SQL administrator on
FENSQLMLMD04, but it's a bit of a hack. Thanks for all your
suggestions and help. Kudos to Jerry for the final idea...

Tim, since you gave terminal services rights to US\US_SQLCmdshell,
pkzipc worked whenever I remoted in to the server as US_SQLCmdshell.
But as soon as I logged off, it stopped working. Same problem between
pkzipc version 8 and version 6 (except that 6 hangs), same problem on
the other sql server.

I think the problem is that pkzipc is looking in the HKCU registry key,
just to see if it exists. If it does, pkzipc reads the user's
environment information from another registry key,
HKLM...\ProfileList\... and then looks like it sets up the command
prompt environment variables. But if HKCU doesn't exist, it drops out
or hangs.

Maybe that's a standard Win32API thing whenever a command shell program
is launched? I don't think so, because I can run other commands like
"xcopy" fine. Anyway, when I'm not logged in as US_SQLCmdshell, the
HKCU key doesn't exist so pkzipc drops out at that point before it ever
loads the user's environment information.

So Jerry suggested that we use a "dummy" or "benign" Windows service
that is running as US\US_SQLCmdshell in order to keep it logged in.
Brilliant -- now it works! "

Jim Youmans
St Louis Missouri

Dan Guzman wrote:

Quote:

Originally Posted by

In SQL 2000, the SQL Agent Proxy account is used as the OS security context
for non-sysadmin users. This is configurable from Enterprise Manager under
SQL Agent-->Properties-->Job System. When the 'Only users with Sysadmin
privileges..' is unchecked, you can specify the Windows account to be used
as the security context for non-sysadmin users. It's best to specify a
minimally privileged account.
>
I see you are located in St. Louis, You might consider joining our local
SQL Server User Group (http://www.stlssug.org/index.html) if you haven't
already done so. We also have a BI special interest group.
>
--
Hope this helps.
>
Dan Guzman
SQL Server MVP
>
"Jim" <jdyoumans@.gmail.comwrote in message
news:1158185320.259108.169510@.p79g2000cwp.googlegr oups.com...

Quote:

Originally Posted by

I have command line PKZip (pkzipc.exe) installed on my SQL Server 2000.
I want to use it to zip up some text files that I receive and process
on a daily basis to save space. I want to schedule it to run as a job.
The problem is that when I run the job as a standard user, it just does
not work. No error messages or anything. If I make the job owned by
SA, it is fine.

My only thought is that when I am signed in as a SA, my account on the
box is in the Admin group. When I sign in as a standard user, I am not
sure what account it uses to hit the file system. I would assume it
would use the xp_cmdshelluser account I have set up but I am not sure.

Has anyone seen this before? It has me stumped.

Any ideas??

Thanks!

Jim Youmans
St Louis, Missouri

Wednesday, March 7, 2012

PK field generate by SQL server using Bulkload

Hi, I'm a bit of Bulkload newbie.
I would like to import XML files into my SQL2k table,
but PK field (identity-yes field) in this table has to be
generated by SQL server.
What have I to write in my XSD file for this PK field?
Thanks for guru :-)Just make sure that bulkload has KeepIdentity=False set on the API, that
should do it.
Irwina
"Gen" <anonymous@.discussions.microsoft.com> wrote in message
news:061301c52a47$36077470$a501280a@.phx.gbl...
> Hi, I'm a bit of Bulkload newbie.
> I would like to import XML files into my SQL2k table,
> but PK field (identity-yes field) in this table has to be
> generated by SQL server.
> What have I to write in my XSD file for this PK field?
> Thanks for guru :-)|||It works!
Thank you so much

>--Original Message--
>Just make sure that bulkload has KeepIdentity=False set
on the API, that
>should do it.
>Irwina
>"Gen" <anonymous@.discussions.microsoft.com> wrote in
message
>news:061301c52a47$36077470$a501280a@.phx.gbl...
be
>
>.
>

PK field generate by SQL server using Bulkload

Hi, I'm a bit of Bulkload newbie.
I would like to import XML files into my SQL2k table,
but PK field (identity-yes field) in this table has to be
generated by SQL server.
What have I to write in my XSD file for this PK field?
Thanks for guru :-)
Just make sure that bulkload has KeepIdentity=False set on the API, that
should do it.
Irwina
"Gen" <anonymous@.discussions.microsoft.com> wrote in message
news:061301c52a47$36077470$a501280a@.phx.gbl...
> Hi, I'm a bit of Bulkload newbie.
> I would like to import XML files into my SQL2k table,
> but PK field (identity-yes field) in this table has to be
> generated by SQL server.
> What have I to write in my XSD file for this PK field?
> Thanks for guru :-)
|||It works!
Thank you so much

>--Original Message--
>Just make sure that bulkload has KeepIdentity=False set
on the API, that
>should do it.
>Irwina
>"Gen" <anonymous@.discussions.microsoft.com> wrote in
message[vbcol=seagreen]
>news:061301c52a47$36077470$a501280a@.phx.gbl...
be
>
>.
>