Dear Expert,
By using stored procedure sp_spaceused, I created an sql script to list the spaces used by all tables in a particular database.
Now my boss asks me to modify the script to a stored procedure so it can list the spaces used by all tables in any given database.
I created a stored...
Hi, Expert
I have a database backup plan. It does all user databases backups and transaction logs backups. The databases full backups are scheduled at 11:30pm daily. The transaction logs backups are scheduled at 12:00pm daily. Both backup files older than 2 days will be removed. The databases...
Dear Expert,
Is it possible to change a database owner to sa?
I created a new database by restoring from a database backup. The owner of the existing database is sa. But the owner of the new database is ATHENA\Administrator. (Here ATHENA is the server name). How do I make the new database to...
Dear Export,
After I created a new database, should I create a db role first or create a db user first?
A Login for the db user exists already.
Is there an easy way to copy users/roles from one database to another?
Thanks
Dear Expert,
The job execute a batch file below:
=====================
osql -E -d tenrox_dev -n -b -i "c:\sama data\mssql\script files\tenrox\g_alter_user_sp.sql"
echo Alter Stored Procedures(type User) completed
=====================
Everything worked fine until I add two lines, date and...
Dear Expert,
Followed the instructions below I copied the user and roles from one database to another. But the permissions of the roles were not be copied over. Is there a way to copy the permissions of the roles over?
Thanks
=====================
In Enterprise Manager
Right Click on your...
Dear Expert,
I need to copy all views from one database to another in the same SQL server. Can I create a SQL program to do it?
If I pick all view names from sysobjects table, how do I avoid picking the system views?
Thanks
Dear Expert,
I try to create a job for a query. I got an error message:
The specified file is 4181 characters in size,which is larger than the available free space in the current job Step command(3200 characters).
Do you want to continue opening this file but have its contents truncated.
Is...
Dear Expert,
I use BCP to export data from tables in one database and then import the data files to the same tables in another database with different collation.
What is the row order in the data files exported from a table? Should the row order in destination table have the same order as in...
Dear Experts,
With your help, I successfully used BCP to export data to files(csdata files) from all tables in a database(collation is case sensitive) and then import the csdata files to another database(collation is case insensitive).
Now I need to verify that the data in both databases are...
Dear Expert,
I use BCP to export data from tables in a database, then import the data files to the same tables in another database.
I had trouble to import data to a table. The table definition is:
CREATE TABLE [dbo].[TWORKFLOWMAPXMLDEF] (
[ORGANIZATIONID] [int] NOT NULL ,
[UNIQUEID] [int]...
Dear Expert,
I have a table created as following:
CREATE TABLE [dbo].[TMAPDATA] (
[ORGANIZATIONID] [int] NOT NULL ,
[TABLENAME] [varchar] (32) COLLATE Latin1_General_CS_AS NOT NULL ,
[FIELDKEY] [varchar] (80) COLLATE Latin1_General_CS_AS NOT NULL ,
[LANGUAGE] [smallint] NOT NULL ...
Dear expert,
I have to change a database collation from case sensitive to case insensitive. So I need to develop queries to find all potential duplicates in unique indexes and primary keys. A query to find all potential duplicates in primary keys is done (refer to sp_pkeys stored procedure). But...
Dear Expert,
What is the different between SQL_Latin1_General_Cp1_CI_AS and Latin1_General_CI_AS ? What does Cp1 represent for? Where do I find this kind information? I searched from SQL help, but I did not find the answer. Help please!
Happy New Year
Dear Expert,
I exported data from one database and need to import to another database (all tables are empty) using BCP utility.
But some tables have foreign keys and it doesn't let me import. How do I drop those constraints and then put them on when import data is done?
Thanks
Dear Expert,
Our company installed Tenrox(an application) to SQL server. The installer assumed the collation of the SQL server is case insensitive which is Tenrox required. But the SQL server was set as case sensitive.
Now I need to fix this problem. Alter database and alter table statements...
Hi Expert,
My SQL server default collation is Latin1_General_CS_AS. Now I need to change a database collation to Lantin1_General_CS_AS.
I execute the following SQL statements:
ALTER DATABASE TESTDB collate Latin1_General_CI_AS
I got error message:
Server: Msg 5030, level 16, state 2, Line 1...
Hi,
My boss will wipe out everything from a server and start it from scratch. The operating system on the server is window 2000 server. I installed SQL server 2000 on the server; and applied PK3a and MS03-31 hotfix on it.
My question is how do I bring the system back to the current stage after...
Hi,
I will apply MS03-031 hotfix to a SQL server. On the server the SQL system files are located in C: drive. The SQL data files are located in E: drive. When I apply hotfix to the SQL server, some system files and data files will be replaced. Will the hotfix be smart enough to know that the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.